<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var Person = function () {};
        var extend = function (o1 , o2) {      //创建继承函数
            for (var k in o2) {
                o1[k] = o2[k];
            }
        };
        //调用extend继承函数
        extend(Person.prototype, {
            run: function () {
                console.log(1111111111);
            },
            say: function () {
                console.log(2222222222222222222);
            }
        });
        var p1 = new Person();
        var p2 = new Person();
        p1.run();
        p2.say();
    </script>
</head>
<body>

</body>
</html>